package com.lzc.tlmail.cart.tlmailcart.feign;

import com.lzc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author lzc
 * @create 2020-10-19 10:51
 */
@FeignClient("product-service")
public interface ProductFeignService {

    /**
     * 获取sku信息
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R getSkuInfo(@PathVariable("skuId") Long skuId);

    /**
     * 获得sku销售属性
     * @param skuId
     * @return
     */
    @RequestMapping("/tlmailproduct/skusaleattrvalue/skuSaleInfo/{skuId}")
    List<String> getSkuSaleInfo(@PathVariable("skuId") Long skuId);


    /**
     * 获取sku价格
     * @param skuId
     * @return
     */
    @GetMapping("/product/skuinfo/skuPrice/{skuId}")
    BigDecimal getSkuPrice(@PathVariable("skuId")Long skuId);
}
